home *** CD-ROM | disk | FTP | other *** search
- /**-------------------------------------------------------------------------------------
-
- Simple demonstration of a modal splash screen window
-
- **-----------------------------------------------------------------------------------**/
-
-
-
- /*------ main ----------------------------------------------------------------------------*/
-
- main()
-
- {
-
- GrafPort myPort;
- WindowPtr myWindow;
- EventRecord myEvent;
- Boolean doQuit;
-
-
- InitGraf((Ptr) &thePort);
- OpenPort(&myPort);
- InitFonts();
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs(nil);
- InitCursor();
-
- doQuit = false;
- myWindow = GetNewWindow(128, NULL, (WindowPtr)-1L);
- SetPort(myWindow);
- MoveTo(15,15);
- DrawString("\pThis is our splash screen test of the mouse...");
- while (doQuit == false) {
- if(WaitNextEvent(everyEvent, &myEvent, 10L, NULL)) {
- switch (myEvent.what) {
- case mouseDown:
- case autoKey:
- case keyDown: {
- DisposeWindow(myWindow);
- doQuit = true;
- break;
- }
- };
- }
- }
- ExitToShell();
- }
-